package com.kipling.kio.demo.server;

import java.io.IOException;
import com.kipling.kio.core.intf.Packet;
import com.kipling.kio.server.KioServer;
import com.kipling.kio.server.ServerGroupContext;
import com.kipling.kio.server.intf.ServerKioHandler;

/** 
 * @author KiplingLee E-mail: kiplinglee@163.com
 * @version 创建时间：2017年5月3日 上午10:39:44 
 * 
 */
public class ServerMain {

	static ServerKioHandler<Packet, Object>  serverHandler = new ShowcaseServerKioHandler();
	static ServerGroupContext<Packet, Object> serverGroupContext = new ServerGroupContext<Packet, Object>(serverHandler);
	static KioServer<Packet, Object> kioServer = new KioServer<Packet, Object>(serverGroupContext);
	public static void main(String[] args) {
		try {
			kioServer.start("127.0.0.1", 6789);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
